package com.foxire.staticmethod;

public class Student {
    private double score;

    // 静态方法,有static 修饰符，属于类持有
    public static void printHello(){
        System.out.println("Hello");
        System.out.println("Hello");
        System.out.println("Hello");
    }

    // 实例方法，没有static 修饰符，属于对象持有
    public void printPass(){
        System.out.println(score >= 60 ? "通过考试" : "未通过");
    }

    public void setScore(double score){
        this.score = score;
    }
}
